'use strict';

const Service = require('egg').Service;

class LoginService extends Service {
  async login(params) {
    // console.log(this.ctx.request.headers);
    const result = await this.ctx.curl(params, {
      dataType: 'json',
    });
    // console.log(params);
    // console.log(result.status, result.headers, result.data);
    // const result = { portal_key: 'PORTAL-ST-6c240679-2d03-4f1f-9a27-fced23ae26ed', status: 'success' };
    return result;
  }
  async request(api, opts) {

    // console.log('-------------4');
    const result = await this.ctx.curl(api, opts);
    return result;
  }
}

module.exports = LoginService;
